fun main() {
    val str = null
    val num = str?.toInt() ?: 0
    println("num = $num")
}